#ifndef __MYDB_H__
#define __MYDB_H__

#include <iostream>
#include <string>
#include <mysql/mysql.h>
#include "mysqlres.h"
#include <memory>

class MyDB
{
public:
    typedef std::shared_ptr<MyDB> ptr;
    MyDB();
    ~MyDB();
    bool initDB(std::string host, std::string user, std::string pwd, std::string db_name);
    MySQLRes::ptr exeSQL(std::string sql);
private:
    MYSQL* connection;
};

#endif